package com.org.redis.omos;

import com.org.redis.config.JedisUtils;
import redis.clients.jedis.Jedis;

import java.util.Set;

public class ZsetDemo {

    public static void main(String[] args) {
        Jedis jedis = JedisUtils.getJedis();
        //存值： key  分值  value
        jedis.zadd("people",1,"a");
        jedis.zadd("people",3,"b");
        //取值：
        Set<String> people = jedis.zrange("people", 0, 100);  //根据分值排序
        people.forEach(System.out::println);
    }
}
